#pragma once
#include "pch.h"
#include "Common.h"
#include <QObject>
#include <QThread>
#include <QMetatype>

namespace AutomatedSurfaceReconstruction
{
	class CMesh :public QObject
	{
		Q_OBJECT

	public:
		explicit CMesh(QObject* vParent = nullptr);

	signals:
		void FinishLoadMesh(std::string vFileName, PCLMeshType::Ptr vMesh);
		void FinishLoadAllMesh();

	public slots:
		void onActionLoadMesh(std::vector<std::string> vFilePathSet, std::unordered_map<std::string, PCLMeshType::Ptr> vioFilePath2Mesh);

	private:
		std::string __getOnlyFileName(const std::string& vFileName, const std::string& vFileSuffix, const std::unordered_map<std::string, PCLMeshType::Ptr>& vFilePath2Mesh);
		std::string __getSuffix(const std::string& vFilePath);
	};
}